﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="FTradeAgentSlectFXFinance.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.FTradeModel.FTradeAgentSlectFXFinance" %>


<form id="pagerForm" method="post" action="FTradeModel/FTradeAgentSlectFXFinance.aspx">
<input type="hidden" name="JingXiaoShang" value="<%=JingXiaoShang %>" />
<input type="hidden" name="JiHao" value="<%=JiHao %>" />
<input type="hidden" name="showid" value="<%=showid %>" />
<input type="hidden" name="hiddenid" value="<%=hiddenid %>" />
<input type="hidden" name="BalanceMoneyid" value="<%=BalanceMoneyid %>" />
<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="20" />
</form>
<form id="form1" runat="server" method="post" action="FTradeModel/FTradeAgentSlectFXFinance.aspx" onsubmit="return dialogSearch(this);">
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    <input type="hidden" name="JingXiaoShang" value="<%=JingXiaoShang %>" />
                    <input type="hidden" name="showid" value="<%=showid %>" />
                    <input type="hidden" name="hiddenid" value="<%=hiddenid %>" />
                    <input type="hidden" name="BalanceMoneyid" value="<%=BalanceMoneyid %>" />
                    机号： <input name="JiHao" type="text" value="<%=JiHao %>"  />
                </td>
                <td>
                     <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                            </li>
                        </ul>
                    </div>
                </td> 
            </tr>
        </table>
    </div>
</div>
<div class="pageContent ">
    <asp:repeater id="rpMenu" runat="server">
        <HeaderTemplate>
        <table class="list" width="100%" layouth="60" targetType="dialog">
        <thead>
            <tr  >                
                <th width="100">合同号</th>
                <th width="80" >机号</th>
                <th width="100">用户姓名</th>
                <th width="80" >应付首付款</th>                
                <th width="80" >已付首付款</th>
                <th width="70">操作</th>             
            </tr>
        </thead> 
        <tbody>
        </HeaderTemplate>
        <ItemTemplate>
            <tr>
                <td><%# Eval("ContractNum")%></td>
				<td><%# Eval("SerialNumber")%></td>
                <td><%# Eval("CustomerName")%></td>
				<td><%# Eval("LPay")%></td>
				<td><%# Eval("LPayYiFu")%></td>
			    <td>
					<a href="javascript:onSelectFTradeAgentSlectFXFinance(<%# Eval("FnncLsId")%>,'<%# Eval("SerialNumber")%>','<%# Eval("LPay")%>','<%# Eval("LPayYiFu")%>')">选择</a>
                </td>
			</tr>
        </ItemTemplate>
        <FooterTemplate>
            </tbody>
         </table>
        </FooterTemplate>
    </asp:repeater>
    <script type="text/javascript">
        function onSelectFTradeAgentSlectFXFinance(FnncLsId,SerialNumber, LPay, LPayYiFu)
        {
            var $showid = $("#<%=showid%>");
            var $hiddenid = $("#<%=hiddenid%>");
            if(LPayYiFu=="")
                LPayYiFu = 0;
           // alert(1)
            var _BalanceMoney = $("#<%=BalanceMoneyid%>").val();
            if (_BalanceMoney == "")
                _BalanceMoney = 0;
           /// alert(2)
            var _weiFu = (parseFloat(LPay) - parseFloat(LPayYiFu));
            if (_BalanceMoney > _weiFu)
           {
                alert("本次冲帐款大于未付首付款,请得新选择.");
                return;
            }
            ///alert(3)
            //alert(SerialNumber + "未付首付" + (parseFloat(LPay) - parseFloat(LPayYiFu)))
            $showid.html(SerialNumber + "未付首付" + _weiFu);
            $hiddenid.val(FnncLsId);
            $.pdialog.closeCurrent();
        }
       

       

    </script>
     <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="dialogPageBreak({numPerPage:this.value})">
               <%=SetnumPerPage() %>
            </select>
            <span>条，共<%=TotalCount%>条</span>
        </div>
        <div class="pagination" targettype="dialog" totalcount="<%=TotalCount%>" numperpage="<%=numPerPage %>"
            pagenumshown="10" currentpage="<%=pageNum %>">
        </div>
    </div>
</div>
</form>
